<template>
	<!-- 显示tag -->
	<el-table-column :width="row.width" :align="row.align || 'center'" :label="row.label || ''" :prop="row.prop">
		<template slot-scope="scope">
			<el-input-number @change="change(scope)" :disabled="row.disabled" v-model="scope.row[row.prop]" :controls="false">
			</el-input-number>
		</template>
	</el-table-column>
</template>

<script>
	export default {
		props: {
			row: Object,
		},
		inject: ['vm'],
		methods: {
			change(scope) {
				if (this.row.method) {
					try {
						this.vm[this.row.method](scope);
					} catch (error) {
						console.log(error);
					}
				}
			}
		},
	};
</script>

<style>
</style>